import { LvUploadFile } from '@/decorator/upload.decorator';
import { Controller, Post, UploadedFile } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger/dist/decorators';
import { UploadService } from './upload.service';
const path = require('path');
const fs = require('fs');

@ApiTags('上传')
@Controller('upload')
export class UploadController {
  constructor(private readonly uploadService: UploadService) {}

  @Post('image')
  @LvUploadFile('file', ['image'], 10)
  uploadIamge(@UploadedFile() file: Express.Multer.File) {
    return file
  }
}
